//
//  AboutUsViewController.m
//  u76ho
//
//  Created by m-air-01 on 16/2/18.
//  Copyright © 2016年 LV. All rights reserved.
//

#import "AboutUsViewController.h"
#import "FeRollingLoader.h"

@interface AboutUsViewController ()

@property (strong, nonatomic) FeRollingLoader *rollingLoader;



@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self main];
    _rollingLoader = [[FeRollingLoader alloc] initWithView:self.view title:@"LOADING"];
    [self.view addSubview:_rollingLoader];
    [_rollingLoader show];
    
    self.navigationItem.title = @"关于益企";
    //[self addBackItem];
   // [self addNavgationBar];
    // Do any additional setup after loading the view.
}
-(void)main
{
    self.view.backgroundColor = [UIColor whiteColor];
    self.automaticallyAdjustsScrollViewInsets = NO;
    [self requestData];
}

-(void)requestData
{
    UIWebView * webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT-64)];
    [self.view addSubview:webView];
    [U76HONet aboutUsWithAction:@"" andDataBlock:^(NSDictionary *dic) {
        NSLog(@"获取关于我们的数据成功了");
        [webView loadHTMLString:[dic objectForKey:@"errmsg"] baseURL:nil];
        [_rollingLoader removeFromSuperview];
    }];
}

#pragma  mark - 返回按钮图标
-(void)addBackItem{
    UIButton * backItem = [UIButton buttonWithType:UIButtonTypeCustom];
    backItem.frame = CGRectMake(0, 0, 9, 17);
    [backItem setImage:[UIImage imageNamed:@"返回图标"] forState:UIControlStateNormal];
    [backItem addTarget:self action:@selector(backItem:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backItem];
}
-(void)backItem:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - NAVgationBarTitle


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
